module Cms
  class HeadingFragment < Fragment
      def initialize
        super()
        e :span, 
          :innerHTML => 'Title here',
          :class => 'f-static'

        e :input, 
          :type => "text",
          :value => 'Title here',
          :class => 'f-editable'
      end
      
      def build
        e :script, "
            dcat_instance.oninit(function(Y) { 
              new Cat.fragments.InputField(document.getElementById('#{id}'), #{options});              
            });"
      end
  end
end